﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;

    public sealed class Ping
    {
        private IntPtr pingWrapper;

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern Ping(string address);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void DestroyPing();
        ~Ping()
        {
            this.DestroyPing();
        }

        private string _ip;
        public string ip
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get
            {
                return _ip;
            }
        }

        private bool _isDone;
        public bool isDone { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get { return _isDone; } }


        private int _time;
        public int time
        {
            [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
            get
            {
                return _time;
            }
        }
    }
}

